DISK SCHEDULING

Experiment Number 3 : SCAN



Algorithm

• Step 1: Let Request array represents an array storing indexes of tracks that have been requested in ascending order of their time of arrival. ‘head’ is the position of disk head.

• Step 2: The initial direction in which head is moving is given and it services in the same direction.

• Step 3: The head services all the requests one by one in the direction head is moving

• Step 4: The head continues to move in the same direction until all the request in this direction are finished.

• Step 5: While moving in this direction calculate the absolute distance of the track from the head.

• Step 6: Increment the total seek count with this distance.

• Step 7: Currently serviced track position now becomes the new head position.